
#ifndef RBTREE_H
#define	RBTREE_H
#ifdef __cplusplus
  extern "C" {
  #endif
struct RBtree;
typedef struct node leaf;
struct node {
	struct node *parent;
	struct node *lchild;
	struct node *rchild;
	char color;
	size_t id;
	void* data;
};

void* create( struct RBtree** T ) ;

void destroy( struct RBtree** T ) ;

void removeBP(struct RBtree* T, struct node* n );

struct node* insert( struct RBtree* s, size_t id, void* data);

void* search( struct RBtree* T, size_t id);

int heightN(struct node* n);

int heightT(struct RBtree* T);
#ifdef __cplusplus
  }
  #endif
#endif

